#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "mydialog.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    MyDialog *dlg = new MyDialog(this);

    connect(dlg,SIGNAL(digReturn(int)),this,SLOT(showValue(int)));
    dlg->show();
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::showValue(int value)
{
    ui->label->setText(tr("获取的值是：%1").arg(value));
}
